#define _CRT_SECURE_NO_WARNINGS 1
int findMaxConsecutiveOnes(int* nums, int numsSize) {
    int count = 0;
    int tmp = 0;
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[i] == 0)
        {
            if (tmp < count)
            {
                tmp = count;
            }
            count = 0;
            continue;
        }
        count++;
        if (tmp < count)
        {
            tmp = count;
        }
    }
    return tmp;
}